package org.fanpeng.demo.design;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * className: Singleton_00
 * Description:
 * date: 2021/8/4 11:13
 *
 * @author fanpeng
 * @version 1.0
 */
public class Singleton_01 {
    // 懒汉模式（线程不安全）
    private static Singleton_01 instance;

    private Singleton_01 (){
    }

    public static Singleton_01 getInstance() {
        if (null != instance) {
            return instance;
        }
        instance = new Singleton_01();
        return instance;
    }
}
